package com.example.service.impl;

import com.example.domain.GroupMember;
import com.example.mapper.GroupMemberMapper;
import com.example.service.IGroupMemberService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GroupMemberServiceImpl implements IGroupMemberService {

    @Autowired
    private GroupMemberMapper groupMemberMapper;

    @Override
    public List<GroupMember> selectGroupMemberListByGroupId(Long groupId) {
        return groupMemberMapper.selectGroupMemberListByGroupId(groupId);
    }

    @Override
    public int insertGroupMember(GroupMember groupMember) {
        return groupMemberMapper.insertGroupMember(groupMember);
    }

    @Override
    public int updateGroupMember(GroupMember groupMember) {
        return groupMemberMapper.updateGroupMember(groupMember);
    }

    @Override
    public int deleteGroupMemberById(Long id) {
        return groupMemberMapper.deleteGroupMemberById(id);
    }

    @Override
    public int deleteGroupMembersByGroupId(Long groupId) {
        return groupMemberMapper.deleteGroupMembersByGroupId(groupId);
    }
}